<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
		<meta http-equiv="expires" content="0">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>微信管理平台</title>
		<!-- 重置样式 -->
		<link rel="stylesheet" href="css/reset.css">
		<!-- icon -->
		<link rel="stylesheet" href="css/fonts.css">
		<link rel="stylesheet" href="css/animate.css">
		<link rel="stylesheet" href="js/layui/css/layui.css">
		<link rel="stylesheet" href="css/main.css">
	</head>
	<body>
		<div class="login-wrapper">
			<div class="login-modal">
				<form class="layui-form" action="">
					<img class="gmmc-logo" src="img/gmmc-logo.png" alt="gmmc-logo">
					<select name="shop" lay-search>
						<option value="">请选择门店</option>
						<option value="LANTIAN">三菱蓝天店</option>
					</select>
					<input class="account-input" name="account" type="text" placeholder="请输入帐号">
					<input class="psw-input" name="password" type="password" placeholder="请输入密码">
					<input class="login-btn" lay-submit lay-filter="formDemo" type="button" value="登陆">
				</form>
			</div>
		</div>
		<script src="js/jquery-3.3.1.min.js"></script>
		<script src="js/layui/layui.js"></script>
		<script>
			layui.use('form', function() {
				var form = layui.form;

				//监听提交
				form.on('submit(formDemo)', function(data) {
					console.log(data.field);
					if (data.field.shop == "") {
						alert('请选择门店');
					} else if (data.field.account == "") {
						alert('帐号不能为空');
					} else if (data.field.password == "") {
						alert('密码不能为空');
					} else {
						window.location.href = "src/index.html";
					}
					return false;
				});
			});
		</script>
	</body>
</html>
